<template>
  <ul class="item-container clearfix">
    <li class="item-box" v-for="(temp, index) in floor1Data" :key="'miva'+ index">
      <div class="item-icon-box">
        <i :class="temp.icon"></i>
      </div>
      <div class="item-title">{{temp.title}}</div>
      <div class="item-info">{{temp.txt}}</div>
    </li>
  </ul>
</template>

<script>
import data from "@/data/index.json";

export default {
  name: "floor1",
  props: {
    floor1Data: {
      type: Array,
      default() {
        return data.floor1Data;
      }
    }
  }
};
</script>


<style lang="less" scoped>
.item-box {
  float: left;
  width: 25%;
  height: 0;
  padding: 10px;
  padding-bottom: 25%;
  text-align: center;
  overflow: hidden;
  cursor: default;

  &:hover .item-icon-box {
    border-color: #007eff;
    transform: rotateZ(360deg);
    &::before {
      background: #007eff;
    }
    .iconfont {
      color: #fff;
    }
  }

  @media (max-width: 768px) {
    & {
      width: 50% !important;
      padding-bottom: 80% !important;
    }
  }
}
.item-icon-box {
  border: 1px solid #666;
  width: 120px;
  height: 120px;
  line-height: 120px;
  margin: auto;
  border-radius: 50%;
  text-align: center;
  transition: all 0.5s;
  position: relative;
  &::before {
    content: "";
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 95%;
    height: 95%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }
  .iconfont {
    font-size: 45px;
    position: relative;
    z-index: 10;
  }
}
.item-title {
  margin: 15px;
  font-size: 18px;
  font-weight: bold;
}
.item-info {
  text-align: left;
}
</style>
